import {
    CORE_HASH_ADD,
    CORE_HASH_DELETE,
    CORE_HASH_LIST,
    CORE_HASH_UPDATE
} from '@/config/api'
import {
    ICoreHash,
    ICoreHashDeleteParameter,
    ICoreHashEditParameter,
    ICoreHashListParameter
} from '@/types/core/hash'
import http from '@/utils/http'

export function coreHashList(parameter: ICoreHashListParameter) {
    return http.get<ICoreHash[]>(CORE_HASH_LIST, parameter)
}

export function coreHashAdd(parameter: ICoreHashEditParameter) {
    return http.post(CORE_HASH_ADD, parameter)
}

export function coreHashUpdate(parameter: ICoreHashEditParameter) {
    return http.post(CORE_HASH_UPDATE, parameter)
}

export function coreHashDelete(parameter: ICoreHashDeleteParameter) {
    return http.post(CORE_HASH_DELETE, parameter)
}
